package com.shrct.businessprocess.purchase.impl;

import com.google.common.base.Objects;
import com.shrct.businessprocess.organization.RCEmployee;
import com.shrct.businessprocess.organization.RCEnterprise;
import com.shrct.businessprocess.organization.RCFinanceLeaderRoleProvider;
import com.shrct.businessprocess.organization.RCInvoiceFinanceManRoleProvider;
import com.shrct.businessprocess.organization.impl.RCEmployeeImpl;
import com.shrct.businessprocess.project.RCCustomerContract;
import com.shrct.businessprocess.project.RCProject;
import com.shrct.businessprocess.project.RCProjectMoney;
import com.shrct.businessprocess.project.RCProjectProcessEvent;
import com.shrct.businessprocess.project.RCProjectProcessEventStatus;
import com.shrct.businessprocess.project.RCProjectStat;
import com.shrct.businessprocess.project.impl.RCCustomerContractImpl;
import com.shrct.businessprocess.project.impl.RCProjectImpl;
import com.shrct.businessprocess.project.impl.RCProjectProcessEventImpl;
import com.shrct.businessprocess.purchase.RCPurchaseIncomeProcess;
import com.shrct.businessprocess.purchase.RCPurchaseIncomeRequest;
import com.shrct.businessprocess.purchase.impl.RCPurchaseIncomeRequestImpl;
import com.shrct.businessprocess.purchase.proxy.RCPurchaseIncomeProcessProxy;
import com.uniquesoft.uidl.validation.Validates;
import edu.fudan.langlab.domain.organization.Party;
import edu.fudan.langlab.domain.security.ISystemUserService;
import edu.fudan.langlab.domain.workflow.ActivityNodeDef;
import edu.fudan.langlab.domain.workflow.Token;
import edu.fudan.langlab.domain.workflow.impl.BusinessProcessImpl;
import edu.fudan.mylang.common.StringExtensions;
import edu.fudan.mylang.pf.IGenericQuery;
import edu.fudan.mylang.pf.IObjectFactory;
import edu.fudan.mylang.utils.DateUtil;
import java.util.Date;
import javax.persistence.AssociationOverride;
import javax.persistence.AssociationOverrides;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Embedded;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import org.eclipse.xtext.xbase.lib.ObjectExtensions;
import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;
import org.springframework.beans.factory.BeanFactory;

@Entity
@DiscriminatorValue("RCPURCHASEINCOMEPROCESS_TYPE")
public class RCPurchaseIncomeProcessImpl extends BusinessProcessImpl implements RCPurchaseIncomeProcess {
  public RCPurchaseIncomeProcessImpl() {
    super();
  }
  
  public String getProcessName() {
    return "项目开票流程";
  }
  
  public String getProcessType() {
    return "RCPurchaseIncomeProcess";
  }
  
  public ActivityNodeDef getActivityDef(final String activityId) {
    edu.fudan.langlab.domain.workflow.ActivityNodeDef result = new edu.fudan.langlab.domain.workflow.ActivityNodeDef();
    result.setActivityId(activityId);
    if("__end__".equals(activityId)){
    	result.setDescription("end");
    }else
    	result.setDescription(Enum.valueOf(com.shrct.businessprocess.purchase.RCPurchaseIncomeProcessStatus.class, activityId).toString());
    return result;
    
  }
  
  public void _start(final RCProject project, final RCCustomerContract customerContract, final String comment, final Procedure1<? super RCPurchaseIncomeRequest> init, final Token token) {
    BeanFactory _beanFactory = this.getBeanFactory();
    ISystemUserService _bean = _beanFactory.<ISystemUserService>getBean(ISystemUserService.class);
    Party _currentUserAsParty = _bean.getCurrentUserAsParty();
    this.starter = ((RCEmployee) _currentUserAsParty);RCPurchaseIncomeRequest rCPurchaseIncomeRequest=RCPurchaseIncomeRequestImpl.create(getObjectFactory());
    final Procedure1<RCPurchaseIncomeRequest> _function = new Procedure1<RCPurchaseIncomeRequest>() {
        public void apply(final RCPurchaseIncomeRequest it) {
          it.setCustomerContract(customerContract);
          it.setProject(project);
        }
      };
    RCPurchaseIncomeRequest _doubleArrow = ObjectExtensions.<RCPurchaseIncomeRequest>operator_doubleArrow(rCPurchaseIncomeRequest, _function);
    this.incomeRequest = _doubleArrow;
    init.apply(this.incomeRequest);
    this.comment = comment;
    RCProject _project = this.incomeRequest.getProject();RCProjectProcessEvent rCProjectProcessEvent=RCProjectProcessEventImpl.create(_project,getObjectFactory());
    final Procedure1<RCProjectProcessEvent> _function_1 = new Procedure1<RCProjectProcessEvent>() {
        public void apply(final RCProjectProcessEvent it) {
          it.setBp(RCPurchaseIncomeProcessImpl.this);
          RCEnterprise _customer = RCPurchaseIncomeProcessImpl.this.incomeRequest.getCustomer();
          String _entityName = _customer.getEntityName();
          String _plus = ("\u8BF7\u6C42\u5F00\u7968\u4E2D,\u5BA2\u6237:" + _entityName);
          String _plus_1 = (_plus + ",\u8BF7\u6C42\u5F00\u7968\u91D1\u989D:");
          RCProjectMoney _amount = RCPurchaseIncomeProcessImpl.this.incomeRequest.getAmount();
          String _string = _amount.toString();
          String _plus_2 = (_plus_1 + _string);
          it.setDescription(_plus_2);
          Date _day = DateUtil.today();
          it.setDate(_day);
          it.setStatus(RCProjectProcessEventStatus.executing);
        }
      };
    ObjectExtensions.<RCProjectProcessEvent>operator_doubleArrow(rCProjectProcessEvent, _function_1);
  }
  
  public void start(final RCProject project, final RCCustomerContract customerContract, final String comment, final Procedure1<? super RCPurchaseIncomeRequest> init) {
    edu.fudan.langlab.domain.workflow.Token token = getProcessManager().start(this,com.shrct.businessprocess.purchase.RCPurchaseIncomeProcessStatus.businessManAudit.name());
    _start(project,customerContract,comment,init,token);
    getProcessManager().registTask(this, token, businessMan(),getBusinessManAudit_task_message());
    systemExecute();
    String msg = getStart_log_message(project,customerContract,comment,init);
    getProcessManager().createActivity(this,"Create Process",msg);
    
    
  }
  
  public String getStart_log_message(final RCProject project, final RCCustomerContract customerContract, final String comment, final Procedure1<? super RCPurchaseIncomeRequest> init) {
    String _nullsafe = StringExtensions.nullsafe(comment);
    String _plus = ("\u542F\u52A8\u5F00\u7968\u6D41\u7A0B,\u5907\u6CE8:" + _nullsafe);
    return _plus;
  }
  
  public void businessManAudit() {
  }
  
  public void _businessManAudit_agree(final String comment, final Token token) {
    Token financeLeaderAudit_token = getProcessManager().forwardTo(token,com.shrct.businessprocess.purchase.RCPurchaseIncomeProcessStatus.financeLeaderAudit.name());
    getProcessManager().registTask(this, financeLeaderAudit_token,financeLeader(),getFinanceLeaderAudit_task_message());
  }
  
  public void businessManAudit_agree(final String comment) {
    edu.fudan.langlab.domain.workflow.Token token = getProcessManager().assertToken(this,com.shrct.businessprocess.purchase.RCPurchaseIncomeProcessStatus.businessManAudit.name());
    _businessManAudit_agree(comment,token);
    systemExecute();
    String msg = getBusinessManAudit_Agree_log_message(comment);
    getProcessManager().createActivity(this,"商务审核.商务同意开票",msg);
    
    
  }
  
  public String getBusinessManAudit_Agree_log_message(final String comment) {
    String _nullsafe = StringExtensions.nullsafe(comment);
    String _plus = ("\u5546\u52A1\u540C\u610F\u5F00\u7968,\u5907\u6CE8:" + _nullsafe);
    return _plus;
  }
  
  public void _businessManAudit_reject(final String comment, final Token token) {
    Token salerModify_token = getProcessManager().forwardTo(token,com.shrct.businessprocess.purchase.RCPurchaseIncomeProcessStatus.salerModify.name());
    getProcessManager().registTask(this, salerModify_token,saler(),getSalerModify_task_message());
  }
  
  public void businessManAudit_reject(final String comment) {
    edu.fudan.langlab.domain.workflow.Token token = getProcessManager().assertToken(this,com.shrct.businessprocess.purchase.RCPurchaseIncomeProcessStatus.businessManAudit.name());
    _businessManAudit_reject(comment,token);
    systemExecute();
    String msg = getBusinessManAudit_Reject_log_message(comment);
    getProcessManager().createActivity(this,"商务审核.商务拒绝开票",msg);
    
    
  }
  
  public String getBusinessManAudit_Reject_log_message(final String comment) {
    String _nullsafe = StringExtensions.nullsafe(comment);
    String _plus = ("\u5546\u52A1\u62D2\u7EDD\u5F00\u7968,\u5907\u6CE8:" + _nullsafe);
    return _plus;
  }
  
  public String getBusinessManAudit_task_message() {
    RCProject _project = this.incomeRequest.getProject();
    String _entityName = _project.getEntityName();
    String _plus = ("\u9879\u76EE\u7F16\u53F7:" + _entityName);
    return _plus;
  }
  
  public void salerModify() {
  }
  
  public void _salerModify_cancel(final String comment, final Token token) {
    Token __end___token = getProcessManager().forwardTo(token,"__end__");
    
  }
  
  public void salerModify_cancel(final String comment) {
    edu.fudan.langlab.domain.workflow.Token token = getProcessManager().assertToken(this,com.shrct.businessprocess.purchase.RCPurchaseIncomeProcessStatus.salerModify.name());
    _salerModify_cancel(comment,token);
    systemExecute();
    String msg = getSalerModify_Cancel_log_message(comment);
    getProcessManager().createActivity(this,"销售修改.销售取消开票申请",msg);
    
    
  }
  
  public String getSalerModify_Cancel_log_message(final String comment) {
    String _nullsafe = StringExtensions.nullsafe(comment);
    String _plus = ("\u9500\u552E\u53D6\u6D88\u5F00\u7968\u7533\u8BF7,\u5907\u6CE8:" + _nullsafe);
    return _plus;
  }
  
  public void _salerModify_modify(final String comment, final Token token) {
    Token businessManAudit_token = getProcessManager().forwardTo(token,com.shrct.businessprocess.purchase.RCPurchaseIncomeProcessStatus.businessManAudit.name());
    getProcessManager().registTask(this, businessManAudit_token,businessMan(),getBusinessManAudit_task_message());
  }
  
  public void salerModify_modify(final String comment) {
    edu.fudan.langlab.domain.workflow.Token token = getProcessManager().assertToken(this,com.shrct.businessprocess.purchase.RCPurchaseIncomeProcessStatus.salerModify.name());
    _salerModify_modify(comment,token);
    systemExecute();
    String msg = getSalerModify_Modify_log_message(comment);
    getProcessManager().createActivity(this,"销售修改.销售完成修改",msg);
    
    
  }
  
  public String getSalerModify_Modify_log_message(final String comment) {
    String _nullsafe = StringExtensions.nullsafe(comment);
    String _plus = ("\u9500\u552E\u4FEE\u6539\u5F00\u7968\u4FE1\u606F,\u5907\u6CE8:" + _nullsafe);
    return _plus;
  }
  
  public String getSalerModify_task_message() {
    RCProject _project = this.incomeRequest.getProject();
    String _entityName = _project.getEntityName();
    String _plus = ("\u9879\u76EE\u7F16\u53F7:" + _entityName);
    return _plus;
  }
  
  public void financeLeaderAudit() {
  }
  
  public void _financeLeaderAudit_agree(final String comment, final Token token) {
    Token financeManRequestInvoice_token = getProcessManager().forwardTo(token,com.shrct.businessprocess.purchase.RCPurchaseIncomeProcessStatus.financeManRequestInvoice.name());
    getProcessManager().registTask(this, financeManRequestInvoice_token,financeMan(),getFinanceManRequestInvoice_task_message());
  }
  
  public void financeLeaderAudit_agree(final String comment) {
    edu.fudan.langlab.domain.workflow.Token token = getProcessManager().assertToken(this,com.shrct.businessprocess.purchase.RCPurchaseIncomeProcessStatus.financeLeaderAudit.name());
    _financeLeaderAudit_agree(comment,token);
    systemExecute();
    String msg = getFinanceLeaderAudit_Agree_log_message(comment);
    getProcessManager().createActivity(this,"财务经理审核.财务主管同意开票",msg);
    
    
  }
  
  public String getFinanceLeaderAudit_Agree_log_message(final String comment) {
    String _nullsafe = StringExtensions.nullsafe(comment);
    String _plus = ("\u8D22\u52A1\u4E3B\u7BA1\u540C\u610F\u5F00\u7968,\u5907\u6CE8:" + _nullsafe);
    return _plus;
  }
  
  public void _financeLeaderAudit_reject(final String comment, final Token token) {
    Token businessManAudit_token = getProcessManager().forwardTo(token,com.shrct.businessprocess.purchase.RCPurchaseIncomeProcessStatus.businessManAudit.name());
    getProcessManager().registTask(this, businessManAudit_token,businessMan(),getBusinessManAudit_task_message());
  }
  
  public void financeLeaderAudit_reject(final String comment) {
    edu.fudan.langlab.domain.workflow.Token token = getProcessManager().assertToken(this,com.shrct.businessprocess.purchase.RCPurchaseIncomeProcessStatus.financeLeaderAudit.name());
    _financeLeaderAudit_reject(comment,token);
    systemExecute();
    String msg = getFinanceLeaderAudit_Reject_log_message(comment);
    getProcessManager().createActivity(this,"财务经理审核.财务主管拒绝开票",msg);
    
    
  }
  
  public String getFinanceLeaderAudit_Reject_log_message(final String comment) {
    String _nullsafe = StringExtensions.nullsafe(comment);
    String _plus = ("\u8D22\u52A1\u4E3B\u7BA1\u62D2\u7EDD,\u5907\u6CE8:" + _nullsafe);
    return _plus;
  }
  
  public String getFinanceLeaderAudit_task_message() {
    RCProject _project = this.incomeRequest.getProject();
    String _entityName = _project.getEntityName();
    String _plus = ("\u9879\u76EE\u7F16\u53F7:" + _entityName);
    return _plus;
  }
  
  public void financeManRequestInvoice() {
  }
  
  public void _financeManRequestInvoice_agree(final String comment, final String invoiceNumber, final Token token) {
    this.incomeRequest.setInvoiceNumber(invoiceNumber);
    Date _day = DateUtil.today();
    this.incomeRequest.setPassDate(_day);
    this.incomeRequest.setIsPassed(Boolean.valueOf(true));
    IGenericQuery<RCProjectProcessEvent> query=getObjectFactory().createGenericQuery(RCProjectProcessEvent.class,"select e from com.shrct.businessprocess.project.impl.RCProjectProcessEventImpl as e   where ((e.bp) = (:this)) and  e.active = 1      ").setParameter("this",this);
    final RCProjectProcessEvent event = query.uniqueResult();
    final Procedure1<RCProjectProcessEvent> _function = new Procedure1<RCProjectProcessEvent>() {
        public void apply(final RCProjectProcessEvent it) {
          RCEnterprise _customer = RCPurchaseIncomeProcessImpl.this.incomeRequest.getCustomer();
          String _entityName = _customer.getEntityName();
          String _plus = ("\u5B8C\u6210\u5F00\u7968,\u5BA2\u6237:" + _entityName);
          String _plus_1 = (_plus + ",\u5F00\u7968\u91D1\u989D:");
          RCProjectMoney _amount = RCPurchaseIncomeProcessImpl.this.incomeRequest.getAmount();
          String _string = _amount.toString();
          String _plus_2 = (_plus_1 + _string);
          it.setDescription(_plus_2);
          Date _day = DateUtil.today();
          it.setFinishDate(_day);
          it.setStatus(RCProjectProcessEventStatus.finished);
        }
      };
    ObjectExtensions.<RCProjectProcessEvent>operator_doubleArrow(event, _function);
    RCProject _project = this.incomeRequest.getProject();
    RCProjectStat _stat = _project.getStat();
    _stat.updateInfo();
    RCProject _project_1 = this.incomeRequest.getProject();
    _project_1.setActualCostDirtyFlag(Boolean.valueOf(true));
    Token __end___token = getProcessManager().forwardTo(token,"__end__");
    
  }
  
  public void financeManRequestInvoice_agree(final String comment, final String invoiceNumber) {
    edu.fudan.langlab.domain.workflow.Token token = getProcessManager().assertToken(this,com.shrct.businessprocess.purchase.RCPurchaseIncomeProcessStatus.financeManRequestInvoice.name());
    _financeManRequestInvoice_agree(comment,invoiceNumber,token);
    systemExecute();
    String msg = getFinanceManRequestInvoice_Agree_log_message(comment,invoiceNumber);
    getProcessManager().createActivity(this,"财务开具发票.财务开具发票",msg);
    
    
  }
  
  public String getFinanceManRequestInvoice_Agree_log_message(final String comment, final String invoiceNumber) {
    String _nullsafe = StringExtensions.nullsafe(comment);
    String _plus = ("\u8D22\u52A1\u5F00\u5177\u53D1\u7968,\u5907\u6CE8:" + _nullsafe);
    String _plus_1 = (_plus + ",\u53D1\u7968\u53F7:");
    String _plus_2 = (_plus_1 + invoiceNumber);
    return _plus_2;
  }
  
  public void _financeManRequestInvoice_reject(final String comment, final Token token) {
    Token salerModify_token = getProcessManager().forwardTo(token,com.shrct.businessprocess.purchase.RCPurchaseIncomeProcessStatus.salerModify.name());
    getProcessManager().registTask(this, salerModify_token,saler(),getSalerModify_task_message());
  }
  
  public void financeManRequestInvoice_reject(final String comment) {
    edu.fudan.langlab.domain.workflow.Token token = getProcessManager().assertToken(this,com.shrct.businessprocess.purchase.RCPurchaseIncomeProcessStatus.financeManRequestInvoice.name());
    _financeManRequestInvoice_reject(comment,token);
    systemExecute();
    String msg = getFinanceManRequestInvoice_Reject_log_message(comment);
    getProcessManager().createActivity(this,"财务开具发票.财务拒绝开票",msg);
    
    
  }
  
  public String getFinanceManRequestInvoice_Reject_log_message(final String comment) {
    String _nullsafe = StringExtensions.nullsafe(comment);
    String _plus = ("\u8D22\u52A1\u62D2\u7EDD\u5F00\u7968,\u5907\u6CE8:" + _nullsafe);
    return _plus;
  }
  
  public String getFinanceManRequestInvoice_task_message() {
    RCProject _project = this.incomeRequest.getProject();
    String _entityName = _project.getEntityName();
    String _plus = ("\u9879\u76EE\u7F16\u53F7:" + _entityName);
    return _plus;
  }
  
  @JoinColumn(name = "incomeRequest_id")
  @ManyToOne(targetEntity = RCPurchaseIncomeRequestImpl.class, cascade = { CascadeType.MERGE, CascadeType.PERSIST })
  private RCPurchaseIncomeRequest incomeRequest;
  
  public RCPurchaseIncomeRequest getIncomeRequest() {
    return this.incomeRequest;
  }
  
  public RCPurchaseIncomeProcess setIncomeRequest(final RCPurchaseIncomeRequest incomeRequest) {
    this.incomeRequest = incomeRequest;
    return this;			
    
  }
  
  @JoinColumn(name = "project_id")
  @ManyToOne(targetEntity = RCProjectImpl.class, cascade = { CascadeType.MERGE, CascadeType.PERSIST })
  private RCProject project;
  
  public RCProject getProject() {
    return this.project;
  }
  
  public RCPurchaseIncomeProcess setProject(final RCProject project) {
    this.project = project;
    return this;			
    
  }
  
  @JoinColumn(name = "customerContract_id")
  @ManyToOne(targetEntity = RCCustomerContractImpl.class, cascade = { CascadeType.MERGE, CascadeType.PERSIST })
  private RCCustomerContract customerContract;
  
  public RCCustomerContract getCustomerContract() {
    return this.customerContract;
  }
  
  public RCPurchaseIncomeProcess setCustomerContract(final RCCustomerContract customerContract) {
    this.customerContract = customerContract;
    return this;			
    
  }
  
  private String invoiceTitle;
  
  public String getInvoiceTitle() {
    return this.invoiceTitle;
  }
  
  public RCPurchaseIncomeProcess setInvoiceTitle(final String invoiceTitle) {
    this.invoiceTitle = invoiceTitle;
    return this;			
    
  }
  
  @Embedded
  @AttributeOverrides(value = { @AttributeOverride(name = "amount", column = @Column(name = "amount_amount") ), @AttributeOverride(name = "workaround", column = @Column(name = "amount_workaround") ) } )
  @AssociationOverrides(value = @AssociationOverride(name = "exchange", joinColumns = @JoinColumn(name = "amount_exchange") ) )
  private RCProjectMoney amount = com.shrct.businessprocess.project.RCProjectMoney.create();
  
  public RCProjectMoney getAmount() {
    return this.amount;
  }
  
  public RCPurchaseIncomeProcess setAmount(final RCProjectMoney amount) {
    this.amount = amount;
    return this;			
    
  }
  
  private String comment;
  
  public String getComment() {
    return this.comment;
  }
  
  public RCPurchaseIncomeProcess setComment(final String comment) {
    this.comment = comment;
    return this;			
    
  }
  
  @JoinColumn(name = "starter_id")
  @ManyToOne(targetEntity = RCEmployeeImpl.class, cascade = { CascadeType.MERGE, CascadeType.PERSIST })
  private RCEmployee starter;
  
  public RCEmployee getStarter() {
    return this.starter;
  }
  
  public RCPurchaseIncomeProcess setStarter(final RCEmployee starter) {
    this.starter = starter;
    return this;			
    
  }
  
  public boolean _systemExecute() {
    boolean stateChanged = false;
    return stateChanged;
  }
  
  public static RCPurchaseIncomeProcess create(final IObjectFactory objectFactory) {
    com.shrct.businessprocess.purchase.RCPurchaseIncomeProcess rCPurchaseIncomeProcess = new com.shrct.businessprocess.purchase.impl.RCPurchaseIncomeProcessImpl();
    objectFactory.create(rCPurchaseIncomeProcess);
    return rCPurchaseIncomeProcess;			
    
  }
  
  public Party saler() {
    return this.starter;
  }
  
  public Party businessMan() {
    RCProject _project = this.incomeRequest.getProject();
    RCEmployee _businessMan = _project.getBusinessMan();
    return _businessMan;
  }
  
  public Party financeLeader() {
    RCEmployee _xblockexpression = null;
    {
      BeanFactory _beanFactory = this.getBeanFactory();
      RCFinanceLeaderRoleProvider _bean = _beanFactory.<RCFinanceLeaderRoleProvider>getBean(RCFinanceLeaderRoleProvider.class);
      final RCEmployee res = _bean.getParty();
      boolean _notEquals = (!Objects.equal(res, null));
      Validates.Assert(_notEquals, "\u672A\u8BBE\u7F6E\u8D22\u52A1\u7ECF\u7406");
      _xblockexpression = (res);
    }
    return _xblockexpression;
  }
  
  public Party financeMan() {
    RCEmployee _xblockexpression = null;
    {
      BeanFactory _beanFactory = this.getBeanFactory();
      RCInvoiceFinanceManRoleProvider _bean = _beanFactory.<RCInvoiceFinanceManRoleProvider>getBean(RCInvoiceFinanceManRoleProvider.class);
      final RCEmployee res = _bean.getParty();
      boolean _notEquals = (!Objects.equal(res, null));
      Validates.Assert(_notEquals, "\u672A\u8BBE\u7F6E\u5F00\u7968\u8D22\u52A1");
      _xblockexpression = (res);
    }
    return _xblockexpression;
  }
  
  public RCPurchaseIncomeProcessProxy toProxy() {
    com.shrct.businessprocess.purchase.proxy.RCPurchaseIncomeProcessProxy proxy = new com.shrct.businessprocess.purchase.proxy.RCPurchaseIncomeProcessProxy();
    proxy.setId(this.getId());
    if(this instanceof edu.fudan.mylang.pf.INamedModelObject){
    	proxy.setName(((edu.fudan.mylang.pf.INamedModelObject)this).getEntityName());
    }
    return proxy;
    
  }
}
